                <div class="block">

                <form id="form" action="<?=$this->linkPost?>" method="post">
                <?php
                $yourCart = $this->yourcart;
                $amount = $this->amount;

                if (count($yourCart) > 0 ) {
                ?>

<div class="block">
	<div class="header">
		<div><?=$this->translate->_('Your swagtag shopping cart')?></div>
	</div>
	<div class="blockcontent">
        <div style="padding:10px 20px">
            <div style="float:left">
                <span class="muiten"><a style="text-align: left;" class="shop_center" href="<?=BASE_URL?>"><?=$this->translate->_('Continue shopping')?></a></span>
            </div>
            
            <div style="float:right">
                <span class="muiten"><a class="shop_center" href="<?=BASE_URL?>/shop/order"><?=$this->translate->_('Check out')?></a></span>
            </div>
            <div style="clear:both;"></div>
        </div>
        <div class="bg-repeat"></div>
        <div style="padding:10px 20px">
          <div style="height:10px;"></div><div class="shop_viewcart_sp"><?=$this->translate->_('Your Items')?></div>
          <div class="shop_viewcart_dg"><?=$this->translate->_('Price')?></div>
          <div class="shop_viewcart_tt"><?=$this->translate->_('Sub-total')?> </div>
          <div class="shop_viewcart_sl"><?=$this->translate->_('Quantity')?></div>
          <div style=" clear:both;"></div>
        </div>  
        <div style="padding:20px">
			<?php
			    $sum = 0;
			    $stt = 1;
			    $bgcolor = array('#FFFFFF', '#EFEFEF');
			    $strItem = "";
			    $i = 0;
			    foreach ($yourCart as $item):
					$price = $item->item_price; 
				    	
			        $strItem .= ($i++ >0 ? ",":"") . $item->item_id;
			        
                    $path = pathinfo($item->item_image, PATHINFO_DIRNAME);
                    $fileName = pathinfo($item->item_image, PATHINFO_BASENAME);
			        
			?>
			        
			        <div class="div-clear"></div>
			        <div style="height:150px;">
			            <div class="shop_viewcart_ha1" ><a href="<?=BASE_URL?>/shop/detail/itemid/<?=$item->item_id?>">
			                <img class="border" id="<?=$item->item_id?>" src="<?=ImageUtil::getImage($path,$fileName,120,120, 100,false)?>" /></a>			                
			            </div>
			            <div class="shop_viewcart_tensp">
			                <a class="shop_center" href="<?=BASE_URL?>/shop/detail/itemid/<?=$item->item_id?>">
			                	<?=$item->item_title?>
			                </a>
			            </div>
			            
			            <div class="shop_viewcart_dg1">
			                <?php 
			                	echo $price;
			               ?>
			            </div>
			            <div class="shop_viewcart_tt1">
			                <?= $price?>
			                <?php
			                    $sum += $price * $amount['' . $item->item_id];
			                ?>
			            </div>
			            
			            <div class="shop_viewcart_sl1" >
			                <?=$this->formText('amount' . $item->item_id, $amount['' . $item->item_id], array('style' => 'width:40px;', 'maxlength' => '5', 'onchange' => "javascript:checkNumber(this);", 'onkeyup' => "javascript:checkNumber(this);"))?>
			            </div>
			            <div class="shop_viewcart_sl1" >
			            	<input type="submit" class="currency_convert_button" value="<?=$this->translate->_('Update')?>">
			            </div>
			            <div class="shop_viewcart_sl1" >
			            	<a href="javascript:deleteItemFromYourCart(<?=$item->item_id?>);"><?=$this->translate->_('remove')?></a>
			            </div>
			            
			            
			        </div>
			        <div class="div-clear"></div>
			<?php
			    endforeach;
			//    echo $this->formHidden('items', $strItem, array('size' => 10));   
			?>
            </div>
                
                <div class="bg-repeat"></div>
                <div class="shop_viewcart_tc">
                    <div style="padding: 10px;width:570px;text-align:right">
                        <?=$this->translate->_('Sub-total')?> : <?=$sum?>
                        <br>
                        <?=$this->translate->_('Total')?> : <?=$sum?>
                    </div>
                </div>
                <div class="bg-repeat"></div>
			    <input type="hidden" value="<?=$strItem?>" name="items">
        <div style="padding:10px 20px">
            <div style="float:left">
                <span class="muiten"><a style="text-align: left;" class="shop_center" href="<?=BASE_URL?>"><?=$this->translate->_('Continue shopping')?></a></span>
            </div>
            
            <div style="float:right">
                <span class="muiten"><a class="shop_center" href="<?=BASE_URL?>/shop/order"><?=$this->translate->_('Check out')?></a></span>
            </div>
            <div style="clear:both;"></div>
        </div>
                <?php
                } // if count > 0
                 ?>
                </form>



                </div>
                <div style="clear: both;"></div>
                    
<script type="text/javascript">
	function checkNumber(object)
	{
		object.value = object.value.replace(/[^0-9]/g, '');
		if (object.value == '')
		{
			object.value = 0;
		}
	}
    function deleteItemFromYourCart(id){
        var strID = "amount" +id;
        var obj = $('#' + strID);
        obj.val(0);
        $('#yourCartForm').submit();
    }
</script>
